package com.eric.service.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.eric.bean.User;
import com.eric.dao.UserMapper;
import com.eric.service.IUserService;

@Service("userService")
public class UserServiceImpl implements IUserService {
    @Resource
    private UserMapper userDao;

    @Override
    public User getUserById(int userId) {
        return this.userDao.selectByPrimaryKey(userId);
    }

	@Override
	public int doAdd(User user) {

		return this.userDao.insert(user);
	}

	@Override
	public List<User> list() {
		
		return this.userDao.selectList();
	}

	@Override
	public List<Map> getFullUser() {
		// TODO Auto-generated method stub
		return this.userDao.selectFullUser();
	}
}
